<template>

    <el-menu
      default-active="2"
      class="el-menu-vertical-demo sidebar-nav"
      >
      <!-- logo -->
      <h2 class="nav-logo">
              domoko
              <sup>®</sup>
      </h2>
      <template v-for="item in nav">
        <el-menu-item index="item.index" @click="goto(item.path)">
          <span slot="title">{{item.title}}</span>
        </el-menu-item>
      </template> 
    
    </el-menu>

</template>
<script>
export default {
  props: {
   
    nav: {
      type: Array
    }
  },
  methods: {
    handleOpen(key, keyPath) {
      console.log(key, keyPath);
    },
    handleClose(key, keyPath) {
      console.log(key, keyPath);
    },
    goto(path) {
      //跳转
      console.log(path);
    }
  }
};
</script>
